using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using VOL.Core.Utilities;
using VOL.Entity.DomainModels;

namespace VOL.demo.IServices
{
    public partial interface IStockInOrderModelService
    {
        /// <summary>
        /// 分页查询入库单
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页记录数</param>
        /// <param name="stockInCode">入库单号</param>
        /// <param name="status">单据状态</param>
        /// <param name="warehouseId">仓库ID</param>
        /// <param name="stockInDate">入库日期</param>
        /// <param name="inOutTypeId">类型ID</param>
        /// <returns>分页结果</returns>
        Task<WebResponseContent> GetStockInOrderPageListAsync(
            int pageIndex, 
            int pageSize, 
            string stockInCode = null, 
            int? status = null, 
            long? warehouseId = null, 
            DateTime? stockInDate = null,
            long? inOutTypeId = null);

        /// <summary>
        /// 根据条件查询入库单列表
        /// </summary>
        Task<List<StockInOrderModel>> FindAsync(Expression<Func<StockInOrderModel, bool>> predicate, bool filterDeleted = true);

        /// <summary>
        /// 保存入库单（主表+明细表，使用事务）
        /// </summary>
        Task<WebResponseContent> SaveStockInOrderWithItemsAsync(SaveStockInOrderRequest request);
    }
}

